package com.kylin.dal.entity.order;

import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 订单项数据项
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月01日 15:46
 */
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_order_lineitem", catalog = "db_kylin_artwork")
public final class OrderLineItemEntry extends BaseEntry implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long itemLineId;

    @Column(name = "order_id")
    private Long orderId;

    @Column(name = "commodity_id")
    private Long commodityId;

    @Column(name = "campaign_id")
    private Long campaignId;

    @Column(name = "board_id")
    private Long boardId;

    @Column(name = "merchant_id")
    private Long merchantId;

    @Column(name = "product_price")
    private Long productPrice;

    @Column(name = "sell_price")
    private Long sellPrice;

    @Column private String title;
    @Column private String subtitle;
    @Column private String cover;

    @Column(name = "created_at", updatable = false, nullable = false)
    private Long createdAt;

    @Column(name = "created_by", updatable = false, nullable = false)
    private Long createdBy;

    @Column(name = "updated_at")
    private Long updatedAt;

    @Column(name = "updated_by")
    private Long updatedBy;
}
